package pack1;

/**
 * Created by jack on 2017/7/3.
 * Java配置方式
 * 使用@Bean的initMethod和destroyMethod(相当于xml配置的init-method和destory-method)
 */
public class BeanWayService {
    public void init()
    {
        System.out.println("@Bean-init-method");
    }

    public BeanWayService()
    {
        super();
        System.out.println("初始化构造函数-BeanWayService");
    }

    public void destroy()
    {
        System.out.println("@Bean-destory-method");
    }
}
